import numpy as np
import pandas as pd

def build() -> dict[str, pd.DataFrame]:
    #路径问题还要解决
    dataPath = {"bus": "./bus.csv", "acbr": "./ACBranch.csv", "acload": "./ACLoad.csv"}
    bus = pd.read_csv(dataPath["bus"], sep=",")
    acbus = bus[bus.type == "ac" or bus.type == "AC"]
    dcbus = bus[bus.type == "dc" or bus.type == "DC"]

    acbranch = pd.read_csv(dataPath["acbr"], sep=",")
    acline = acbranch[acbranch.type == "L" or acbranch.type == "l"]
    acswitch = acbranch[acbranch.type == "s" or acbranch.type == "S"]

    return {"acbus": acbus, "dcbus": dcbus, "acline": acline, "acsw": acswitch}
